package server.core.dao;

import java.util.HashMap;

import server.core.base.EntityBase;
import server.core.dao.DaoFactory.daoType;

public interface Dao{
	
	/**
	 * @param entity
	 * @return Entity`s id
	 */
	public long saveObject(EntityBase entity);
	
	/**
	 * @param entityClass
	 * @param id
	 * @return True if success
	 */
	public boolean deleteObject(Class<? extends EntityBase> entityClass,long id);
	
	/**
	 * @param entityClass
	 * @param id
	 * @return Entity
	 */
	public EntityBase getObject(Class<? extends EntityBase> entityClass,long id);
	
	/**
	 * @return Enum daoType
	 */
	public daoType getDaoType();
	
	public HashMap<Long,? extends EntityBase> getEntityMap(Class<? extends EntityBase> entityObject);
	
	public boolean setEntityMap(Class<? extends EntityBase> entityClass,
			HashMap<Long,? extends EntityBase> hashmap1);
}
